Developer Documentation

QuickTime 4 API Documentation
QuickTime 3 Reference

| Chapter Contents | Next |

Miscellaneous QuickTime Functions

This Web page describes functions currently being added to the QuickTime documentation.

GetDSequenceMatrix

GetDSequenceMatrix gets the matrix that was specified for a decompression sequence by a call to SetDSequenceMatrix , or that was set at DecompressSequenceBegin .

OSErr GetDSequenceMatrix (
                     ImageSequence seqID,
                     MatrixRecordPtr matrix);
seqID
Contains the unique sequence identifier that was returned by the DecompressSequenceBegin function.
matrix
Points to a matrix structure that specifies how to transform the image during decompression.

InstrumentGetSynthesizerType

InstrumentGetSynthesizerType gets the synthesizer type for an instrument.

ComponentResult InstrumentGetSynthesizerType (
                     ComponentInstance ci,
                     OSType *synthesizerType);
ci
The instrument component instance. You obtain the identifier from the Component Manager's OpenComponent function..
synthesizerType
Pointer to the returned type
DESCRIPTION

This function returns the synthesizer type (the subtype of the synthesizer component) associated with a given instrument component. Older instrument components (developed before QuickTime 2) may not support this call.

NewMusicMIDIReadHookProc

NewMusicMIDIReadHookProc creates a MIDI read hook routine descriptor.

MusicMIDIReadHookUPP NewMusicMIDIReadHookProc (
                     MusicMIDIReadHookProcPtr userRoutine);
userRoutine
A pointer to the user callback function to be called when receiving incoming MIDI events
function result
A pointer to a routine descriptor.
DESCRIPTION

Given a pointer to a user callback function, NewMusicMIDIReadHookProc creates a MIDI read hook routine descriptor suitable for use with the NAUseDefaultMIDIInput function and returns a pointer to it.

NewMusicOfflineDataProc

xx creates a routine descriptor for an offline synthesis callback function.

MusicOfflineDataUPP NewMusicOfflineDataProc (
                     MusicOfflineDataProcPtr userRoutine);
userRoutine
A pointer to a a user callback function to be called periodically with a buffer of synthesized sample data.
function result
A pointer to a routine descriptor.
DESCRIPTION

This function creates a routine descriptor for an offline synthesis callback function. The callback function will be called periodically with a buffer of synthesized sample data, which may be written to a file. The pointer that this function returns may be passed to the MusicStartOffline function.

QTPhotoDefineHuffmanTable

QTPhotoDefineHuffmanTable defines a Huffman table.

ComponentResult QTPhotoDefineHuffmanTable (
                     ComponentInstance codec,
                     short componentNumber,
                     Boolean isDC,
                     unsigned char *lengthCounts,
                     unsigned char *values);
codec
Identifies your connection to the image compressor component.
componentNumber
Specifies a color component. If 0, the luminance Huffman table is set. If 1, the chrominance Huffman table is set.
isDC
If true, the DC Huffman table is set. If false, the AC Huffman table is set.
lengthCounts
Points to an array of 16 length counts.
values
Points to an array of Huffman values.
DESCRIPTION

This function lets you define a Huffman table to be used in future JPEG compression operations. Normally the JPEG image compressor components use the default Huffman tables as specified in sections K.3 through K.6 of the JPEG specification. You can use the QTPhotoDefineHuffmanTable function to override the default tables.

This call is supported only by the Photo JPEG and Motion JPEG compressors. Only advanced programmers will need to use this function.

QTPhotoDefineQuantizationTable

QTPhotoDefineQuantizationTable specifies a custom quantization table.

ComponentResult QTPhotoDefineQuantizationTable (
                     ComponentInstance codec,
                     short componentNumber,
                     unsigned char *table);
codec
Identifies your connection to the image compressor component.
componentNumber
If 0, the luminance quantization table is set. If 1, the chrominance quantization table is set.
table
Points to an array of 64 quantization values.
DESCRIPTION

By default, the JPEG compressors select quantization tables based on quality settings. The QTPhotoDefineQuantizationTable function lets you override these tables with tables of your own choice.

This call is only supported by the Photo JPEG and Motion JPEG compressors. Only advanced programmers will need to use this function.

QTPhotoSetRestartInterval

QTPhotoSetRestartInterval specifies the restart interval to use in future JPEG compression operations.

ComponentResult QTPhotoSetRestartInterval (
                     ComponentInstance codec,
                     unsigned short restartInterval);
codec
Identifies your connection to the image compressor component.
restartInterval
The new restart interval. Pass 0 to tell the compressor not to insert restart markers in the data stream.
DESCRIPTION

By default, the JPEG compressor components do not insert restart markers in the compressed data stream unless the "optimize for streaming" setting is selected.

This call is supported only by the Photo JPEG and Motion JPEG compressors. Only advanced programmers will need to use this function.

QTPhotoSetSampling

QTPhotoSetSampling specifies the chrominance downsampling ratio to use in future JPEG compression operations.

ComponentResult QTPhotoSetSampling (
                     ComponentInstance codec,
                     short yH,
                     short yV,
                     short cbH,
                     short cbV,
                     short crH,
                     short crV);
yH , yV
The number of luminance blocks to put in each macroblock.
cbH, cbV
The number of chroma blue blocks to put in each macroblock.
crH, crV
The number of chroma red blocks to put in each macroblock.
DESCRIPTION

By default, the Photo JPEG compressor uses 4:1:1 chroma downsampling and the Motion JPEG compressors use 4:2:2 chroma downsampling for most quality settings. For codecLosslessQuality, both compressors disable chroma downsampling.

Currently the only supported downsampling ratios are none (pass 1,1,1,1,1,1), 4:2:2 (pass 2,1,1,1,1,1) and 4:1:1 (pass 2,2,1,1,1,1).

This call is supported only by the Photo JPEG and Motion JPEG compressors. Only advanced programmers will need to use this function.


© 1998 Apple Computer, Inc.

| Chapter Contents | Next |